package com.lemons.hackaton.algorithm;

import java.util.List;

import com.lemons.hackaton.algorithm.Activity;

public class Schedule {

	private Integer hour;
	private String activityId;
	private Activity activity;
	private List<String> persons;
	private Float profit;
	
	public Float getProfit() {
		return profit;
	}

	public void setProfit(Float profit) {
		this.profit = profit;
	}

	public Integer getHour() {
		return hour;
	}
	
	public void setHour(Integer hour) {
		this.hour = hour;
	}
	
	public String getActivityId() {
		return activityId;
	}
	
	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}
	
	public Activity getActivity() {
		return activity;
	}
	
	public void setActivity(Activity activity) {
		this.activity = activity;
	}
	
	public List<String> getPersons() {
		return persons;
	}
	public void setPersons(List<String> persons) {
		this.persons = persons;
	}

	@Override
	public String toString() {
		return "Schedule [hour=" + hour + ",\n activity=" + activity
				+ ",\n persons=" + personsToString(persons) + "]\r\n";
	}

	private String personsToString(List<String> persons2) {
        if(persons2==null){
        	return null;
        }
        StringBuilder rez = new StringBuilder();
        for(String p:persons2){
        	rez.append(p+",\n");
        }
		return rez.toString();
	}
	
	
}
